import { IMusic } from '@/interface';
import { $get, $post, $put, $delete } from '@/request/api';

export function fetchMusicList(params) {
  return $get('/music/list',params);
}

export function fetchCreateMusic(data: IMusic) {
  return $post('/music/create',data);
}

export function fetchUpdateMusic(data: IMusic) {
  return $put(`/music/update/${data.id}`,data);
}

export function fetchDeleteMusic(id: number) {
  return $delete(`/music/delete/${id}`);
}
